<?php

/**
 * tblUsers form base class.
 *
 * @method tblUsers getObject() Returns the current form's model object
 *
 * @package    travis
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BasetblUsersForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                => new sfWidgetFormInputHidden(),
      'title'             => new sfWidgetFormInputText(),
      'title_he'          => new sfWidgetFormInputText(),
      'title_ru'          => new sfWidgetFormInputText(),
      'first_name'        => new sfWidgetFormInputText(),
      'last_name'         => new sfWidgetFormInputText(),
      'email'             => new sfWidgetFormInputText(),
      'password'          => new sfWidgetFormInputText(),
      'phone1'            => new sfWidgetFormInputText(),
      'phone2'            => new sfWidgetFormInputText(),
      'fax'               => new sfWidgetFormInputText(),
      'type'              => new sfWidgetFormInputText(),
      'status'            => new sfWidgetFormInputText(),
      'country'           => new sfWidgetFormInputText(),
      'region'            => new sfWidgetFormInputText(),
      'city'              => new sfWidgetFormInputText(),
      'address'           => new sfWidgetFormInputText(),
      'working_time_from' => new sfWidgetFormTextarea(),
      'working_time_to'   => new sfWidgetFormTextarea(),
      'scype'             => new sfWidgetFormTextarea(),
      'website'           => new sfWidgetFormTextarea(),
      'description_en'    => new sfWidgetFormInputText(),
      'description_he'    => new sfWidgetFormInputText(),
      'description_ru'    => new sfWidgetFormInputText(),
      'logo'              => new sfWidgetFormInputText(),
      'latitude'          => new sfWidgetFormInputText(),
      'logitude'          => new sfWidgetFormInputText(),
      'permissions'       => new sfWidgetFormInputText(),
      'commissions'       => new sfWidgetFormInputText(),
      'balance'           => new sfWidgetFormInputText(),
      'credit'            => new sfWidgetFormInputText(),
      'orders'            => new sfWidgetFormInputText(),
      'reputation'        => new sfWidgetFormInputText(),
      'language'          => new sfWidgetFormInputText(),
      'create_time'       => new sfWidgetFormDateTime(),
      'update_time'       => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'title'             => new sfValidatorPass(array('required' => false)),
      'title_he'          => new sfValidatorPass(array('required' => false)),
      'title_ru'          => new sfValidatorPass(array('required' => false)),
      'first_name'        => new sfValidatorPass(array('required' => false)),
      'last_name'         => new sfValidatorPass(array('required' => false)),
      'email'             => new sfValidatorPass(array('required' => false)),
      'password'          => new sfValidatorPass(array('required' => false)),
      'phone1'            => new sfValidatorPass(array('required' => false)),
      'phone2'            => new sfValidatorPass(array('required' => false)),
      'fax'               => new sfValidatorPass(array('required' => false)),
      'type'              => new sfValidatorInteger(array('required' => false)),
      'status'            => new sfValidatorInteger(array('required' => false)),
      'country'           => new sfValidatorPass(array('required' => false)),
      'region'            => new sfValidatorPass(array('required' => false)),
      'city'              => new sfValidatorPass(array('required' => false)),
      'address'           => new sfValidatorPass(array('required' => false)),
      'working_time_from' => new sfValidatorString(array('required' => false)),
      'working_time_to'   => new sfValidatorString(array('required' => false)),
      'scype'             => new sfValidatorString(array('required' => false)),
      'website'           => new sfValidatorString(array('required' => false)),
      'description_en'    => new sfValidatorPass(array('required' => false)),
      'description_he'    => new sfValidatorPass(array('required' => false)),
      'description_ru'    => new sfValidatorPass(array('required' => false)),
      'logo'              => new sfValidatorPass(array('required' => false)),
      'latitude'          => new sfValidatorPass(array('required' => false)),
      'logitude'          => new sfValidatorPass(array('required' => false)),
      'permissions'       => new sfValidatorInteger(array('required' => false)),
      'commissions'       => new sfValidatorPass(array('required' => false)),
      'balance'           => new sfValidatorPass(array('required' => false)),
      'credit'            => new sfValidatorPass(array('required' => false)),
      'orders'            => new sfValidatorInteger(array('required' => false)),
      'reputation'        => new sfValidatorPass(array('required' => false)),
      'language'          => new sfValidatorInteger(array('required' => false)),
      'create_time'       => new sfValidatorDateTime(array('required' => false)),
      'update_time'       => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('tbl_users[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'tblUsers';
  }

}
